package com.roadmap.client.module.plan;

import java.util.List;
import java.util.Vector;

import com.roadmap.client.common.ISimpleResultSet;
import com.roadmap.entities.LifePlan;
import com.roadmap.exception.InvalidValueException;
import com.roadmap.exception.NullObjectException;
import com.roadmap.exception.InvalidQueryException;
import com.roadmap.exception.ServerException;

public interface IPlanProgress {
	/**
	 * get the days between two neighbor milestones. to return valid value,
	 * method getAllMilestonesOfPlan should be called first.
	 */
	// public Vector<Integer> getDaysBetweeStones();

	/**
	 * get the ideal progresses of the plan. return an array which includes each
	 * milestone's ideal progress
	 */
	public int getIdealProgress(LifePlan plan) throws NullObjectException,
			InvalidQueryException, InvalidValueException, ServerException;

	/** get the actual progress of the plan */
	public int getActualProgress(LifePlan plan) throws NullObjectException,
			InvalidQueryException, InvalidValueException, ServerException;

	/**
	 * in case the tasks' actual progress has been calculated in other place, no
	 * need to do the calculation again
	 * 
	 * @param srs:
	 *            this set contains IDs of plan's tasks and corresponding actual
	 *            progress
	 */
	public int getActualProgress(LifePlan plan, ISimpleResultSet srs)
			throws NullObjectException, InvalidQueryException,
			InvalidValueException, ServerException;

	/** get all milestones of a plan. */
	public List getAllMilestonesOfPlan(LifePlan plan)
			throws NullObjectException, InvalidQueryException,
			InvalidValueException, ServerException;

	/**
	 * get total proportion assigned to the tasks of the plan
	 * 
	 * @throws NullObjectException
	 * @throws ServerException
	 * @throws InvalidQueryException
	 */
	public int getAssignedProportion(String planId) throws NullObjectException, InvalidQueryException, ServerException;
}
